package com.css.zfzx.fwsjcj.modules.basecontroller.controller;

import com.css.bpm.platform.base.response.RestResponse;
import com.css.zfzx.fwsjcj.modules.basecontroller.service.FwDivisionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;


@Slf4j
public class GetDivisionController {
    @Autowired
    FwDivisionService fwDivisionService;
    public RestResponse findFullNameById(@PathVariable("divisionId") String divisionId) {
        RestResponse response = null;
        String fullName = "";

        try {
            fullName = fwDivisionService.findFullNameById(divisionId);
            response = RestResponse.succeed(fullName);
        } catch (Exception var6) {
            String errorMessage = "获取行政区划全名称失败!";
            log.error(errorMessage, var6);
            response = RestResponse.fail(errorMessage);
        }
        return response;
    }
}
